﻿
using OABLL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using OAModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MyOA
{
    public partial class Main : Form
    {
        
        public string _yuangongid = string.Empty;
        public Main(string oa)
        {
            InitializeComponent();
            this._yuangongid= oa;

        }

        private void button1_Click(object sender, EventArgs e)
        {
            new 请假管理(_yuangongid).Show();

        }

        

        //加载页面信息
        private void Main_Load(object sender, EventArgs e)
        {
            OAUseEntity user = new OAUseBLL().Getyuangong(_yuangongid);
            this.label1.Text = user.Oa员工id;
            this.label2.Text = user.Oa姓名;
        }


        //工资管理
        private void button3_Click(object sender, EventArgs e)
        {
            new Gongziguanli(_yuangongid).Show();
        }

        //报销管理
        private void button2_Click(object sender, EventArgs e)
        {
            new 报销管理(_yuangongid).Show();
        }

       
        //转正管理
        private void 转正管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
           // new ZhuanZhengXinXi(_yuangongid).Show();
        }

        private void 离职管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
           // new LiZhiXinXi(_yuangongid).Show();
        }

        //站内信
        private void button6_Click(object sender, EventArgs e)
        {
            new zhanneixin(_yuangongid).Show();
        }

        //系统设置
        private void button5_Click(object sender, EventArgs e)
        {
            new UserSetUp(_yuangongid).Show();
        }


        //转正管理
        private void button4_Click(object sender, EventArgs e)
        {
            new ZhuanZhengXinXi(_yuangongid).Show();
        }


        //离职申请
        private void button7_Click(object sender, EventArgs e)
        {
            new LiZhiXinXi(_yuangongid).Show();
        }
        /// <summary>
        /// 关闭窗体后，彻底销毁程序进程
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Main_FormClosed(object sender, FormClosedEventArgs e)
        {
            System.Environment.Exit(0);//(彻底销毁)
        }

        private void 退出系统ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();//
            System.Environment.Exit(0);//(彻底销毁)

        }
    }





}
